//
//  ball.h
//  baseball
//
//  Created by Donggi Hahm on 10. 03. 14.
//  Copyright 2010 ComTalk. All rights reserved.
//

#import "global.h"
#import "cocos2d.h"


enum
{
	BALLKIND_2SEAM,
	BALLKIND_CHANGEUP,
	BALLKIND_CIRCLE,
	BALLKIND_SLIDER,
	BALLKIND_4SEAM,
	BALLKIND_CURVE,
	BALLKIND_SINKER,
	BALLKIND_FORK,
	BALLKIND_SF,
	BALLKIND_END
};


@interface ball : CCNode
{
	CGSize m_windowSize;
	NSInteger m_DeviceKind;			//iPhone or iPad
	
	int nBallType;
	int nX[ MAX_FRAME_BALL ];
	int nY[ MAX_FRAME_BALL ];
	int nShadowY[ MAX_FRAME_BALL ];
	float nSize[ MAX_FRAME_BALL ];
		
	NSInteger nCurrentFrame;
	NSInteger nTotalFrame;
	
	CCSprite *spBall;
	CCSprite *spBallShadow;
}

@property (nonatomic, retain) CCSprite *spBall;
@property (nonatomic, retain) CCSprite *spBallShadow;
@property NSInteger nCurrentFrame;
@property NSInteger nTotalFrame;

- (void) GenerateBatteryViewBallPath;
- (void) GenerateBatteryViewBattingBall;
- (int) GetX: (int)nFrameIdx;
- (int) GetY: (int)nFrameIdx;
- (int) GetShadowY: (int)nFrameIdx;
- (float) GetSize: (int)nFrameIdx;
@end
